#计算列表中属于字符串前缀的个数

def count_prefix(string: list, prefix: str):
    count = 0
    for word in string:
        if prefix.startswith(word):
            count += 1

    return count

print(count_prefix(['a','b','c','ab','bc','abc'], 'abc'))